From c1330b1ea3525eec2d09b070167df563f3917ff9 Mon Sep 17 00:00:00 2001 From: chai Date: Tue, 22 Jan 2019 20:06:22 +0800 Subject: =?UTF-8?q?*=E4=BF=AE=E6=94=B9=E6=96=87=E4=BB=B6=E5=90=8D=E5=A4=A7?= =?UTF-8?q?=E5=B0=8F=E5=86=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Source/Asura.Framework/graphics/animation.lua | 6 +++++ Source/Asura.Framework/graphics/animator.lua | 18 +++++++++++++++ Source/Asura.Framework/graphics/camera.lua | 7 ++++++ Source/Asura.Framework/graphics/canvasrenderer.lua | 0 Source/Asura.Framework/graphics/defaultshaders.lua | 5 +++++ Source/Asura.Framework/graphics/material.lua | 26 ++++++++++++++++++++++ .../Asura.Framework/graphics/materialmanager.lua | 5 +++++ Source/Asura.Framework/graphics/mesh2drenderer.lua | 5 +++++ Source/Asura.Framework/graphics/particlesystem.lua | 3 +++ Source/Asura.Framework/graphics/renderer.lua | 3 +++ Source/Asura.Framework/graphics/shaperenderer.lua | 0 .../graphics/spritebatchrenderer.lua | 0 Source/Asura.Framework/graphics/spriterenderer.lua | 7 ++++++ 13 files changed, 85 insertions(+) create mode 100644 Source/Asura.Framework/graphics/animation.lua create mode 100644 Source/Asura.Framework/graphics/animator.lua create mode 100644 Source/Asura.Framework/graphics/camera.lua create mode 100644 Source/Asura.Framework/graphics/canvasrenderer.lua create mode 100644 Source/Asura.Framework/graphics/defaultshaders.lua create mode 100644 Source/Asura.Framework/graphics/material.lua create mode 100644 Source/Asura.Framework/graphics/materialmanager.lua create mode 100644 Source/Asura.Framework/graphics/mesh2drenderer.lua create mode 100644 Source/Asura.Framework/graphics/particlesystem.lua create mode 100644 Source/Asura.Framework/graphics/renderer.lua create mode 100644 Source/Asura.Framework/graphics/shaperenderer.lua create mode 100644 Source/Asura.Framework/graphics/spritebatchrenderer.lua create mode 100644 Source/Asura.Framework/graphics/spriterenderer.lua (limited to 'Source/Asura.Framework/graphics') diff --git a/Source/Asura.Framework/graphics/animation.lua b/Source/Asura.Framework/graphics/animation.lua new file mode 100644 index 0000000..8b52683 --- /dev/null +++ b/Source/Asura.Framework/graphics/animation.lua @@ -0,0 +1,6 @@ +--把animation asset加入默认资源 +local Animation = AsuraEngine.Asset.New("animation") + + + +AsuraEngine.Animation = Animation \ No newline at end of file diff --git a/Source/Asura.Framework/graphics/animator.lua b/Source/Asura.Framework/graphics/animator.lua new file mode 100644 index 0000000..1dca9f4 --- /dev/null +++ b/Source/Asura.Framework/graphics/animator.lua @@ -0,0 +1,18 @@ +local Animator = Class(function(go) + self.gameobject = go + self.spriteRenderer = go:GetSpriteRenderer() +end) + +Animator.animation = AsuraEngine.Animation.None + +local animation = AsuraEngine.Animation.New() + +function Animator:OnUpdate(dt) + +end + +function Animator:OnRender() + +end + +return Animator \ No newline at end of file diff --git a/Source/Asura.Framework/graphics/camera.lua b/Source/Asura.Framework/graphics/camera.lua new file mode 100644 index 0000000..41d4394 --- /dev/null +++ b/Source/Asura.Framework/graphics/camera.lua @@ -0,0 +1,7 @@ +local Camera = Class() + +Camera.mIsOnScreen = false + +Camera.mIsCulling = false + +return Camera \ No newline at end of file diff --git a/Source/Asura.Framework/graphics/canvasrenderer.lua b/Source/Asura.Framework/graphics/canvasrenderer.lua new file mode 100644 index 0000000..e69de29 diff --git a/Source/Asura.Framework/graphics/defaultshaders.lua b/Source/Asura.Framework/graphics/defaultshaders.lua new file mode 100644 index 0000000..bd54cb9 --- /dev/null +++ b/Source/Asura.Framework/graphics/defaultshaders.lua @@ -0,0 +1,5 @@ +--[[ +内置的shaders. +]] + + diff --git a/Source/Asura.Framework/graphics/material.lua b/Source/Asura.Framework/graphics/material.lua new file mode 100644 index 0000000..5f7a7fa --- /dev/null +++ b/Source/Asura.Framework/graphics/material.lua @@ -0,0 +1,26 @@ +--[[ +材质,是对shader的代理 +]] +local Material = AsuraEngine.Class() + +function Material:Ctor() + +end + +function Material:ToAsset() + +end + +function Material:GetUniform(id, value) + +end + +function Material:SendFloat() + +end + +function Material:GetUniformID() + +end + +return Material \ No newline at end of file diff --git a/Source/Asura.Framework/graphics/materialmanager.lua b/Source/Asura.Framework/graphics/materialmanager.lua new file mode 100644 index 0000000..46cc13d --- /dev/null +++ b/Source/Asura.Framework/graphics/materialmanager.lua @@ -0,0 +1,5 @@ +local MaterialManager = AsuraEngine.Manager.New() + + + +return MaterialManager \ No newline at end of file diff --git a/Source/Asura.Framework/graphics/mesh2drenderer.lua b/Source/Asura.Framework/graphics/mesh2drenderer.lua new file mode 100644 index 0000000..01f0d90 --- /dev/null +++ b/Source/Asura.Framework/graphics/mesh2drenderer.lua @@ -0,0 +1,5 @@ +local Mesh2DRenderer = Class() + + + +return Mesh2DRenderer \ No newline at end of file diff --git a/Source/Asura.Framework/graphics/particlesystem.lua b/Source/Asura.Framework/graphics/particlesystem.lua new file mode 100644 index 0000000..21c35b8 --- /dev/null +++ b/Source/Asura.Framework/graphics/particlesystem.lua @@ -0,0 +1,3 @@ +--粒子系统,是一个组件 + +local ParticleSystem diff --git a/Source/Asura.Framework/graphics/renderer.lua b/Source/Asura.Framework/graphics/renderer.lua new file mode 100644 index 0000000..1e44c73 --- /dev/null +++ b/Source/Asura.Framework/graphics/renderer.lua @@ -0,0 +1,3 @@ +local Renderer = Class() + +return Renderer \ No newline at end of file diff --git a/Source/Asura.Framework/graphics/shaperenderer.lua b/Source/Asura.Framework/graphics/shaperenderer.lua new file mode 100644 index 0000000..e69de29 diff --git a/Source/Asura.Framework/graphics/spritebatchrenderer.lua b/Source/Asura.Framework/graphics/spritebatchrenderer.lua new file mode 100644 index 0000000..e69de29 diff --git a/Source/Asura.Framework/graphics/spriterenderer.lua b/Source/Asura.Framework/graphics/spriterenderer.lua new file mode 100644 index 0000000..79177ba --- /dev/null +++ b/Source/Asura.Framework/graphics/spriterenderer.lua @@ -0,0 +1,7 @@ +local SpriteRenderer = Class() + +function SpriteRenderer:OnRender() + +end + +return SpriteRenderer \ No newline at end of file -- cgit v1.1-26-g67d0