This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Panda3D input polling interface idea | |
# When a keyboard/controller/mouse button is pressed/released/moved | |
# the values in base.inputs is updated. | |
# The keys are {device_name}-{button_name} | |
# The values for buttons are 1 or 0 | |
forward = 'keyboard-w' | |
if base.inputs[forward]: | |
self.pc.set_y(self.pc, dt*move_speed) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
The FilterManager is a convenience class that helps with the creation | |
of render-to-texture buffers for image postprocessing applications. | |
Still need to implement: | |
* Make sure sort-order of buffers is correct. | |
* Matching buffer size to original region instead of original window. | |
* Intermediate layer creation. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I presume the sliders go from-1.0 to 1.0, | |
left_trigger is listed two times, left_trigger* is the second from the top | |
left_x and left_y rest at ~0.0, right_trigger, left_trigger and left_trigger*, rest ~0.25 | |
'digital' mode: | |
device_tester.py html5gamepad.com actual button is ok? | |
left_y(1.0) axis1 (-1.0) d-pad up Yes | |
left_x(-1.0) axis0 (-1.0) d-pad left Yes | |
left_y(1.0) axis1 (1.0) d-pad down Yes | |
left_x(1.0) axis0 (1.0) d-pad right Yes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PS C:\Basis Software Platform> py -3 setup.py build_apps | |
running build_apps | |
Building platforms: manylinux1_x86_64,manylinux1_i686,win32,win_amd64 | |
Gathering wheels for platform: manylinux1_x86_64 | |
Collecting panda3d==1.10.0.dev1511+deployng.222 (from -r ./requirements.txt (line 2)) | |
File was already downloaded c:\basis software platform\build\__whl_cache__\panda3d-1.10.0.dev1511+deployng.222-cp36-cp | |
36m-manylinux1_x86_64.whl | |
Successfully downloaded panda3d | |
Building runtime for platform: manylinux1_x86_64 | |
There are some missing modules: ['__builtin__'] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from panda3d.core import * | |
from direct.interval.IntervalGlobal import * | |
seq=Sequence(Wait(5.0), Wait(1.0)) | |
print(seq.get_duration()) | |
print(seq) | |
print(seq.get_duration()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#version 150 | |
// This is the terrain fragment shader. There is a lot of code in here | |
// which is not necessary to render the terrain, but included for convenience - | |
// Like generating normals from the heightmap or a simple fog effect. | |
// Most of the time you want to adjust this shader to get your terrain the look | |
// you want. The vertex shader most likely will stay the same. | |
// ADDED TEXTUR SPLATTING! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
Drag & Drop Demo | |
Use the mouse to drag and drop colored squares from moving frames or the background. | |
Use left mouse click to grab a square, release it to ...well, release it. | |
''' | |
from panda3d.core import * | |
from direct.gui.DirectGui import * | |
from direct.showbase import ShowBase | |
from direct.interval.LerpInterval import LerpPosInterval | |
from direct.interval.MetaInterval import Sequence |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from panda3d.core import * | |
from random import uniform | |
import sys | |
import bisect | |
if sys.version_info >= (3, 3): | |
from time import perf_counter as timer | |
else: | |
if sys.platform == "win32": | |
from time import clock as timer | |
else: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from panda3d.core import * | |
load_prc_file_data('','bullet-filter-algorithm groups-mask') | |
from panda3d.bullet import * | |
from direct.showbase.DirectObject import DirectObject | |
from direct.showbase import ShowBase | |
class App(DirectObject): | |
def __init__(self): | |
#init panda3d showbase | |
base = ShowBase.ShowBase() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Original release by rdb under the Unlicense (unlicense.org) | |
# Modified by wezu | |
from __future__ import print_function | |
from math import floor, ceil | |
import time | |
import ctypes | |
from ctypes.wintypes import WORD, UINT, DWORD | |
from ctypes.wintypes import WCHAR as TCHAR | |
from direct.showbase.DirectObject import DirectObject |
NewerOlder