kaboom icon indicating copy to clipboard operation
kaboom copied to clipboard

Not render objects in Wechat Mini Program

Open zdying opened this issue 3 years ago • 3 comments

Version

v2000.1

What browsers are you seeing the problem on?

Other

What happened?

I adapted the WeChat Mini Program, and the code can run normally without any errors.

But no objects are rendered, and display a black screen.

5adacdf21ce363e5a83ba238ed1cf98

What's the expected behavior?

Render all objects.

Minimum reproducable code

kaboom({
  canvas: canvas,
  width: 375,
  height: 667
})

loadSprite("bean", "sprites/bean.png")
loadSprite("ghosty", "sprites/ghosty.png")

const player = add([
  sprite("bean"), 
  pos(120, 80), 
  rotate(0),  
  origin("center"), 
])

Live demo

No response

Is there an existing issue for this?

  • [X] I've searched and there is no existing issue for this bug

zdying avatar Dec 15 '21 09:12 zdying

You can explain more? What is Wechat Mini Program

lajbel avatar Dec 28 '21 14:12 lajbel

Hi! Sorry for the late response. Does Wechat mini program support WebGL? Does other WebGL code / library work?

slmjkdbtl avatar Dec 28 '21 16:12 slmjkdbtl

Hi! Sorry for the late response. Does Wechat mini program support WebGL? Does other WebGL code / library work?

Yes, It supoort WebGL, and cocos works fine.

zdying avatar Jan 05 '22 09:01 zdying

Maybe related, but when opening even the simplest kaboom program in the WeChat browser all I get is "Script Error"

import kaboom from "kaboom";
kaboom()

Wondering if could have something to do with what I see on normal chrome:

The AudioContext was not allowed to start. It must be resumed (or created) after a user gesture on the page. https://goo.gl/7K7WLu
(anonymous) @ kaboom.ts:795
default @ kaboom.ts:817
(anonymous) @ wc-test.ts:24
Show 2 more frames

Also sometimes see violation warnings related to scroll-blocking.

Testing with kaboom 3000.0.2

pjoe avatar May 28 '23 09:05 pjoe