-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpixi.js
More file actions
32 lines (28 loc) · 663 Bytes
/
Copy pathpixi.js
File metadata and controls
32 lines (28 loc) · 663 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import {
BatchRenderer,
Container,
ENV,
Graphics,
Renderer,
Ticker,
settings,
systems,
} from 'pixi.js'
import { install } from '@pixi/unsafe-eval'
install({ systems })
Renderer.registerPlugin('batch', BatchRenderer)
// The static Ticker intances automatically start an animation frame loop
// during lazy loading. As a workaround, eagerly load them and stop it:
Ticker.shared.autoStart = false
Ticker.shared.stop()
Ticker.system.autoStart = false
Ticker.system.stop()
// WebGL 2 -> 1 fallback seems broken on Safari.
// As a workaround, prefer WebGL 1:
settings.PREFER_ENV = ENV.WEBGL
export {
Container,
Graphics,
Renderer,
Ticker
}