Commit 711222f6 authored by rockyl's avatar rockyl

RenderContext修改为类导出

parent d6f15329
......@@ -24,7 +24,6 @@ export default {
typescript({
typescript: require('typescript'),
tslib: require('tslib'),
useTsconfigDeclarationDir: true,
declaration: false,
}),
commonjs(),
......
......@@ -3,7 +3,7 @@
*
*/
import {Entity, getStageSize, ScillaComponent, createVector2D, Vector2D, math} from "scilla";
import {Entity, ScillaComponent, createVector2D, Vector2D, math, getRenderContext} from "scilla";
import Transform from "../base/Transform";
/**
......@@ -37,7 +37,7 @@ export default class CameraController extends ScillaComponent {
get stageSize(){
if(!this._stageSize){
this._stageSize = getStageSize();
this._stageSize = getRenderContext().getStageSize();
}
return this._stageSize;
......
......@@ -3,7 +3,7 @@
*
*/
import {getStageSize, ScillaComponent, } from "scilla";
import {getRenderContext, ScillaComponent, } from "scilla";
/**
* 全舞台尺寸组件
......@@ -17,7 +17,7 @@ export default class FullStageSize extends ScillaComponent {
get stageSize(){
if(!this._stageSize){
this._stageSize = getStageSize();
this._stageSize = getRenderContext().getStageSize();
}
return this._stageSize;
......
......@@ -2,7 +2,7 @@
* Created by rockyl on 2018/11/6.
*/
import {createCanvas, getContext, ScillaComponent, Bounds, Vector2D, math, decorators, EngineConfig} from "scilla";
import {createCanvas, getRenderContext, ScillaComponent, Bounds, Vector2D, math, decorators, EngineConfig} from "scilla";
const {dirtyFieldTrigger} = decorators;
......@@ -51,7 +51,7 @@ export default class Renderer extends ScillaComponent {
protected _anchorOffset: Vector2D = new Vector2D();
//渲染上下文
protected _context = getContext();
protected _context = getRenderContext().getContext();
/**
* 扩展尺寸
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment